<div class="add-c">
  <nz-header class="account-header">
      <button nz-button nzType="primary" (click)="showModal()">添加新地址</button>
  </nz-header>
  
  <nz-content>
    <div class="account-table">
      <app-wallet-table [data]="_data" [titleData]='_config' [page]='_page' (tabelEvent)='onClick($event)'></app-wallet-table>
    </div>
  </nz-content>
</div>


<nz-modal nzWidth="466px" class="banks-from" [(nzVisible)]="isVisible" [nzTitle]="modalTitle" [nzContent]="modalContent" [nzFooter]="null" [nzClosable]='false' (nzOnCancel)="handleCancel()">
    <ng-template #modalTitle >
        <h4>{{_altTitle}}</h4>
    </ng-template>

    <ng-template #modalContent>
        <form nz-form [formGroup]="validateForm" >

          
          <nz-form-item>
            <nz-form-label [nzSpan]="24" nzRequired>地址</nz-form-label>
            <nz-form-control  [nzSpan]="24" nzHasFeedback >
              <input nz-input formControlName="address" placeholder="请输入地址"  nzRequired >
              <nz-form-explain style="color:red" *ngIf="validateForm.get('address').dirty&&validateForm.get('address').errors" >
                <ng-container *ngIf="validateForm.get('address').hasError('required')">
                    请输入地址
                </ng-container>
                <ng-container *ngIf="validateForm.get('address').hasError('pattern')">
                    地址格式错误
                </ng-container>
              </nz-form-explain>
            </nz-form-control>
          </nz-form-item>

          <nz-form-item>
            <nz-form-label [nzSpan]="24" nzRequired>联系人</nz-form-label>
            <nz-form-control  [nzSpan]="24" nzHasFeedback >
              <input  nz-input formControlName="tag" placeholder="请输入备注" nzRequired maxlength="100">
              <nz-form-explain style="color:red" *ngIf="validateForm.get('tag').dirty&&validateForm.get('tag').errors" >
                <ng-container *ngIf="validateForm.get('tag').hasError('required')">
                    请输入联系人
                </ng-container>
              </nz-form-explain>
            </nz-form-control>
          </nz-form-item>

        </form>

        <div  class="from-footer">
          <button nz-button nzType="primary" [disabled]="!validateForm.valid" (click)="handleOk(validateForm.value)">确认</button>
          <button nz-button nzType="default" (click)="handleCancel()" [nzLoading]="isConfirmLoading">取消</button>
        </div>
    </ng-template>

  </nz-modal>